package com.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mapper.FriendMapper;
import com.example.mapper.SportMapper;
import com.example.pojo.Friend;
import com.example.pojo.Sport;
import com.example.service.IFriendService;
import com.example.service.ISportService;
import com.example.vo.UserFriend;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class FriendServiceImpl extends ServiceImpl<FriendMapper, Friend> implements IFriendService {

    @Autowired
    private FriendMapper friendMapper;

    public List<UserFriend> getFriendList(Long userId) {
        return friendMapper.findByUserId(userId);
    }

    public List<UserFriend> getAllFriends() {
        return friendMapper.selectAllFriends();
    }

    // 实现其他IFriendService接口中的业务逻辑方法
    // ...
}
